package com.cqjtu.eecs.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.cqjtu.eecs.entity.Teacher;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.cqjtu.eecs.entity.params.teacher.TeacherUpdateParams;
import com.cqjtu.eecs.entity.vo.TeacherCodeNameVo;
import com.cqjtu.eecs.entity.vo.TeacherVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 教师 Mapper 接口
 * </p>
 *
 * @author    
 * @since 2022-03-07
 */
public interface TeacherMapper extends BaseMapper<Teacher> {

    /**
     * 分页获取全部教师信息
     * @param teacherVoPage
     * @param academyName
     * @return
     */
    Page<TeacherVo> getAllTeacherInfo(Page<TeacherVo> teacherVoPage, @Param("name") String academyName);

    /**
     * 修改教师信息
     * @param teacherUpdateParams
     * @return
     */
    int updateTeacherInfo(@Param("teacher") TeacherUpdateParams teacherUpdateParams);

    Teacher selectTeacherByTeacherCode(String teacherCode);

    List<TeacherCodeNameVo> getTeacherCodeNameVoByMajorCode(@Param("id") String academyId);
}
